package org.dynamicallyacquired.jwt;

import cn.soboys.restapispringbootstarter.authorization.*;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

@Configuration
public class UserJwtConfig {


    @Bean
    public UserSign MyUserSign() {
        return new MyUserSign();
    }

    @Bean
    @Primary
    public LoginAuthorization loginAuthorizationSubject() {
        return new MyLoginAuthorization();
    }


    @Bean
    public UserJwtToken userJwtToken(UserSign MyUserSign) {
        UserJwtToken userJwtToken = new UserJwtToken();
        userJwtToken.setUserSign(MyUserSign);
        return userJwtToken;
    }
}